package Task9;

import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int n = scanner.nextInt();
            int m = scanner.nextInt();
            System.out.println(getRoadNum(n,m));
        }
    }
    public static int getRoadNum(int n,int m){
        if((n == 1 && m >= 1) || (m == 1 && n >= 1) ){
            return n+m;
        }
        return getRoadNum(n-1,m) + getRoadNum(n,m-1);
    }
}
